package com.sort;
public class SortDemo{
	public void find(int val, int ar[], int n){
		int mid = n/2;
		if(ar[mid] == val){
			System.out.println("Found:"+val);
		}else if(ar[mid] < val){
			for(int i = mid; i<n; i++){
				if(ar[mid] == val){
					System.out.println("Found:"+val);
				}else{
					System.out.println("Not Found");
				}
			}
		}else if(ar[mid] > val){
			for(int i = mid; i<n; i++){
				if(ar[mid] == val){
					System.out.println("Found:"+val);
				}else{
					System.out.println("Not Found");
				}
			}
		}
	}
}
